<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./../../../WEB-INF/templates/noFooterCompanyTemplate.xhtml">
            <ui:define name="content">
                <h:form id="viewCandidateForm">
                    <h:outputScript target="head" library="javascript" name="video.js"></h:outputScript>
                    <h:outputScript target="head" library="javascript" name="masonry.js"></h:outputScript>
                    <h:outputScript target="head" library="javascript" name="indexViewCandidate.js"></h:outputScript>
                    <p:dialog onHide="stopPlayers();" id="editVideoCurrentDialog" styleClass="videoDialog" modal="true" resizable="false" widgetVar="editVideoCurrentDialog" header="#{messages.VideoTag}" position="top" draggable="true" closable="true"> 
                        <p:panel styleClass="noMargin noPadding noBorder" id="editVideoCurrentDialogPanel">
                                <p:panel rendered="#{viewFolderCandidateBean.selectedLanguageInfo.video!=null}">
                                    <video controls="true" class="video">
                                       <source id="srcMp4" type="video/mp4" src="/candidateFiles/#{viewFolderCandidateBean.adquiredProfile.candidate.idCandidate.toString()}/videos/#{viewFolderCandidateBean.selectedLanguageInfo.video}.mp4" />
                                       <source id="srcOgg" type="video/ogg" src="/candidateFiles/#{viewFolderCandidateBean.adquiredProfile.candidate.idCandidate.toString()}/videos/#{viewFolderCandidateBean.selectedLanguageInfo.video}.ogg" />
                                       <object id="flowplayer" name="flowplayer" width="640" height="480" data="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf" 
                                                type="application/x-shockwave-flash">
                                          <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf" />
                                          <param name="allowfullscreen" value="true" />
                                          <param name="flashvars" 
                                        value='config={"clip":"/candidateFiles/#{viewFolderCandidateBean.adquiredProfile.candidate.idCandidate.toString()}/videos/#{viewFolderCandidateBean.selectedLanguageInfo.video}.mp4"}' />
                                       </object>
                                    </video>
                                </p:panel>
                        </p:panel>
                    </p:dialog>
                    
                    <div class="fixedCandidateAbstract">
                        <p:panel styleClass="noMargin noPadding noBorder">
                            <h:graphicImage rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.bodyFormal!=null}" styleClass="imagenAbstractIndex" value="/candidateFiles/#{viewFolderCandidateBean.adquiredProfile.candidate.idCandidate.toString()}/images/#{viewFolderCandidateBean.adquiredProfile.candidate.bodyFormal}"></h:graphicImage>
                            <p:outputPanel styleClass="videoOutputPanel" rendered="#{viewFolderCandidateBean.videoIndex!=null}">
                               <p:commandLink process="@this" update=":viewCandidateForm:editVideoCurrentDialogPanel" oncomplete="editVideoCurrentDialog.show();">
                                            <h:graphicImage library="images" name="bigplay.png"></h:graphicImage>
                                            <f:setPropertyActionListener target="#{viewFolderCandidateBean.selectedLanguageInfo}" value="#{viewFolderCandidateBean.videoIndex}"></f:setPropertyActionListener>
                                </p:commandLink>
                            </p:outputPanel>
                        </p:panel>
                    </div>
                    
                    <div class="divContentViewCandidate">
                        <div class="viewCandidateColumn">
                            <div class="viewCandidateColumnTitle personalBackgroundButton">
                                <span>#{messages.PersonalInfo}</span>
                            </div>
                            <p:panel styleClass="noBorder noPadding noMargin">
                                <p:panelGrid columnClasses="personalViewPanelGridColumn" styleClass="personalViewPanelGrid noMargin noPadding noBorder" columns="1">  
                                    <h:outputText class="viewCandidateLabel" value="#{messages.Name}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.name==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.name!=null}" value="#{viewFolderCandidateBean.adquiredProfile.candidate.name}">  </h:outputText>  

                                    <h:outputText class="viewCandidateLabel" value="#{messages.LastName}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.lastName==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" id="lastName" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.lastName!=null}" value="#{viewFolderCandidateBean.adquiredProfile.candidate.lastName}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.Email}"></h:outputText>
                                    <h:outputText class="viewCandidateText" value="#{viewFolderCandidateBean.adquiredProfile.candidate.user.email}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.Phone}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.phone==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.phone!=null}" id="phone"  value="#{viewFolderCandidateBean.adquiredProfile.candidate.phone}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.BirthDay}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.birthDay==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.birthDay!=null}" id="birthDay" value="#{viewFolderCandidateBean.adquiredProfile.candidate.birthDay}">
                                        <f:convertDateTime pattern="d/M/yyyy"></f:convertDateTime>
                                    </h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.Sex}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.sex==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.sex!=null}" id="selectSex" value="#{sexBundle[viewFolderCandidateBean.adquiredProfile.candidate.sex.idSex.toString()]}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.Country}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.country==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.country!=null}" id="selectCountry" value="#{countryBundle[viewFolderCandidateBean.adquiredProfile.candidate.country.idCountry.toString()]}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.Province}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.province==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.province!=null}" value="#{viewFolderCandidateBean.adquiredProfile.candidate.province.description}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.Town}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.town==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.town!=null}" value="#{viewFolderCandidateBean.adquiredProfile.candidate.town.description}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.TimeAvailability}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.timeAvailability==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.timeAvailability!=null}" value="#{timeAvailabilityBundle[viewFolderCandidateBean.adquiredProfile.candidate.timeAvailability.idTimeAvailability.toString()]}"></h:outputText>

                                    <h:outputText class="viewCandidateLabel" value="#{messages.OwnVehicle}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.hasVehicle==null}" value="#{messages.InformationNotAvailable}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.hasVehicle!=null and viewFolderCandidateBean.adquiredProfile.candidate.hasVehicle}" value="#{messages.Yes}"></h:outputText>
                                    <h:outputText class="viewCandidateText" rendered="#{viewFolderCandidateBean.adquiredProfile.candidate.hasVehicle!=null and !viewFolderCandidateBean.adquiredProfile.candidate.hasVehicle}" value="#{messages.No}"></h:outputText>
                                </p:panelGrid>
                            </p:panel>
                        </div>
                        <div class="viewCandidateColumn #{polaroidBean.randomTextAlign eq 1 ? 'right' : ''}">
                            <div class="viewCandidateColumnTitle professionalBackgroundButton">
                                <span>#{messages.ProfessionalInfo}</span>
                            </div>
                            <p:panel styleClass="noBorder noPadding noMargin">
                                <p:dataGrid emptyMessage="#{messages.InformationNotAvailable}" var="professionalInfo" value="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateProfessionalInfoList}" paginator="false" columns="1" rows="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateProfessionalInfoList.size()}">
                                    <p:panelGrid columnClasses="personalViewPanelGridColumn" styleClass="personalViewPanelGrid noMargin noPadding noBorder" columns="1">  
                                        <h:outputText class="viewCandidateLabel" value="#{professionalInfo.company}"></h:outputText>
                                        <h:outputText class="viewCandidateText" value="#{jobPositionBundle[professionalInfo.jobPosition.idJobPosition.toString()]}"></h:outputText>
                                        <h:outputText class="viewCandidateText" value="#{jobDurationBundle[professionalInfo.jobDuration.idJobDuration.toString()]}"></h:outputText>
                                        <p:panel rendered="#{professionalInfo.startDate!=null or professionalInfo.finishDate!=null}" styleClass="noBorder noMargin noPadding">
                                            <h:outputText style="display: inline" class="viewCandidateText" value="#{professionalInfo.startDate}" rendered="#{professionalInfo.startDate!=null}">  
                                                <f:convertDateTime pattern="d/M/yyyy"></f:convertDateTime>
                                            </h:outputText>
                                            <h:outputText style="display: inline" class="viewCandidateText" value=" - "/>
                                            <h:outputText style="display: inline" class="viewCandidateText" value="#{professionalInfo.finishDate}" rendered="#{professionalInfo.finishDate!=null}">  
                                                <f:convertDateTime pattern="d/M/yyyy"></f:convertDateTime>
                                            </h:outputText>
                                        </p:panel>
                                        <h:outputText class="viewCandidateText" value="#{sectorBundle[professionalInfo.sector.idSector.toString()]}">  </h:outputText>
                                        <h:outputText class="viewCandidateText" value="#{professionalInfo.description}" rendered="#{professionalInfo.description!=null}">  </h:outputText>
                                    </p:panelGrid>
                                </p:dataGrid>
                            </p:panel>
                        </div>

                        <div class="viewCandidateColumn #{polaroidBean.randomTextAlign eq 1 ? 'right' : ''}">
                            <div class="viewCandidateColumnTitle educationalBackgroundButton">
                                <span>#{messages.EducationalInfo}</span>
                            </div>
                            <p:panel styleClass="noBorder noPadding noMargin">
                                <p:dataGrid emptyMessage="#{messages.InformationNotAvailable}" var="educationalInfo" value="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateEducationalInfoList}" paginator="false" columns="1" rows="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateEducationalInfoList.size()}">
                                    <p:panelGrid columnClasses="personalViewPanelGridColumn" styleClass="personalViewPanelGrid noMargin noPadding noBorder" columns="1">
                                        <h:outputText class="viewCandidateLabel" value="#{educationalInfo.description}" ></h:outputText> 
                                        <h:outputText styleClass="viewCandidateText" value="#{educationalLevelBundle[educationalInfo.educationalLevel.idEducationalLevel.toString()]}"></h:outputText>
                                        <h:outputText styleClass="viewCandidateText" value="#{sectorBundle[educationalInfo.sector.idSector.toString()]}" ></h:outputText>
                                        <h:outputText styleClass="viewCandidateText" value="#{educationalStatusBundle[educationalInfo.status.idEducationalStatus.toString()]}" ></h:outputText>
                                    </p:panelGrid>
                                </p:dataGrid>
                            </p:panel>
                        </div>
                        
                        <div class="viewCandidateColumn #{polaroidBean.randomTextAlign eq 1 ? 'right' : ''}">
                            <div class="viewCandidateColumnTitle languageBackgroundButton">
                                <span>#{messages.LanguageInfo}</span>
                            </div>
                            <p:panel id="languageInformationPanel" styleClass="noBorder noPadding noMargin">
                                <p:dataGrid emptyMessage="#{messages.InformationNotAvailable}" var="languageInfo" value="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateLanguageInfoList}" paginator="false" columns="1" rows="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateLanguageInfoList.size()}">
                                    <p:panelGrid columnClasses="personalViewPanelGridColumn" styleClass="personalViewPanelGrid noMargin noPadding noBorder" columns="1">
                                        <h:outputText styleClass="viewCandidateLabel" value="#{languageBundle[languageInfo.language.idLanguage.toString()]}" ></h:outputText> 
                                        <h:outputText styleClass="viewCandidateText" value="#{languageInfo.languageLevel.description}"></h:outputText>
                                        <h:outputText styleClass="viewCandidateText" value="#{languageInfo.writingLevel.description}"></h:outputText>
                                        <h:outputText styleClass="viewCandidateText" value="#{languageInfo.description}"></h:outputText>
                                        <h:outputText rendered="#{languageInfo.video==null}" styleClass="viewCandidateText" value="#{messages.VideoNotAvailable}" ></h:outputText>
                                        <p:outputPanel rendered="#{languageInfo.video!=null}">
                                            <p:commandLink process="@this" update=":viewCandidateForm:editVideoCurrentDialogPanel" oncomplete="editVideoCurrentDialog.show();">
                                                <h:graphicImage styleClass="dataTableIconImage" library="images" name="play.png"></h:graphicImage>
                                                <f:setPropertyActionListener target="#{viewFolderCandidateBean.selectedLanguageInfo}" value="#{languageInfo}"></f:setPropertyActionListener>
                                            </p:commandLink>
                                        </p:outputPanel>
                                    </p:panelGrid>
                                </p:dataGrid>
                                <p:commandButton update="@parent" disabled="#{viewFolderCandidateBean.companyRequestedVideo()}" styleClass="updatePicturesButton languageBackgroundButton marginBottom20 marginTop20" value="#{messages.RequiredUploadVideo}" rendered="#{!viewFolderCandidateBean.candidateHasVideo()}" action="#{viewFolderCandidateBean.requiredNewVideo()}"  /> 
                            </p:panel>
                        </div>
                        
                        
                        <div class="viewCandidateColumn #{polaroidBean.randomTextAlign eq 1 ? 'right' : ''}">
                            <div class="viewCandidateColumnTitle relocatingBackgroundButton">
                                <span>#{messages.RelocatingInfo}</span>
                            </div>
                            <p:panel styleClass="noBorder noPadding noMargin">
                                <p:dataGrid emptyMessage="#{messages.InformationNotAvailable}" var="relocatingInfo" value="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateRelocatingInfoList}" paginator="false" columns="1" rows="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateRelocatingInfoList.size()}">
                                    <p:panelGrid columnClasses="personalViewPanelGridColumn" styleClass="personalViewPanelGrid noMargin noPadding noBorder" columns="1">
                                        <h:outputText rendered="#{relocatingInfo.province!=null}" styleClass="viewCandidateLabel" value="#{relocatingInfo.province.description}" ></h:outputText> 
                                        <h:outputText rendered="#{relocatingInfo.province==null}" styleClass="viewCandidateLabel" value="#{messages.AnyProvince}" ></h:outputText> 
                                        <h:outputText styleClass="viewCandidateText" value="#{countryBundle[relocatingInfo.country.idCountry.toString()]}"></h:outputText>
                                    </p:panelGrid>
                                </p:dataGrid>
                            </p:panel>
                        </div>
                        
                        <div class="viewCandidateColumn #{polaroidBean.randomTextAlign eq 1 ? 'right' : ''}">
                            <div class="viewCandidateColumnTitle interestBackgroundButton">
                                <span>#{messages.InterestArea}</span>
                            </div>
                            <p:panel styleClass="noBorder noPadding noMargin">
                                <p:dataGrid emptyMessage="#{messages.InformationNotAvailable}" var="interestArea" value="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateInterestAreaList}" paginator="false" columns="1" rows="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateInterestAreaList.size()}">
                                    <p:panelGrid columnClasses="personalViewPanelGridColumn" styleClass="personalViewPanelGrid noMargin noPadding noBorder" columns="1">
                                        <h:outputText styleClass="viewCandidateLabel" value="#{sectorBundle[interestArea.sector.idSector.toString()]}" ></h:outputText> 
                                        <h:outputText styleClass="viewCandidateText" value="#{jobPositionBundle[interestArea.jobPosition.idJobPosition.toString()]}" ></h:outputText> 
                                        <h:outputText styleClass="viewCandidateText" value="#{interestArea.desiredSalary.description}"></h:outputText>
                                    </p:panelGrid>
                                </p:dataGrid>
                            </p:panel>
                        </div>
                        <div class="viewCandidateColumn #{polaroidBean.randomTextAlign eq 1 ? 'right' : ''}">
                            <div class="viewCandidateColumnTitle skillsBackgroundButton">
                                <span>#{messages.Skills}</span>
                            </div>
                            <p:panel styleClass="noBorder noPadding noMargin">
                                <p:dataGrid emptyMessage="#{messages.NoSkills}" var="tag" value="#{viewFolderCandidateBean.adquiredProfile.candidate.candidateTagsList}" paginator="false" columns="3" >
                                    <p:panel styleClass="skillBackgroundDataGridElementlow">
                                        <h:outputText rendered="#{tag.tag!=null}" value="#{tag.tag}" ></h:outputText> 
                                    </p:panel>
                                </p:dataGrid>
                            </p:panel>
                        </div>
                    </div>
                </h:form>
            </ui:define>
        </ui:composition>

    </body>
</html>
